﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Input;
using SpiritAlight.Input;
using SpiritAlight.GeneralClac;

namespace SpiritAlight.Stage
{
    public static class Coordinate
    {


        static readonly Vector2 screenSize  = new Vector2(1280.0f, 720.0f);
        static readonly Vector2 worldSize   = new Vector2(3000.0f, 3800.0f);

        public static Vector2 ScreenSize
        {
            get { return screenSize; }
        }

        public static Vector2 WorldSize
        {
            get { return worldSize; }
        }


        public static Vector2 ScreenCenter
        {
            get { return Camera.Position + new Vector2(640.0f, 360.0f); }
        }

        static Coordinate()
        {
            
        }

        public static Vector2 GlobalToScreen(Vector2 globalCoordinate)
        {
            return globalCoordinate - Camera.Position;
        }

        public static Vector2 ScreenToGlobal(Vector2 screenCoordinate)
        {
            return screenCoordinate + Camera.Position;
        }
    }
}
